/**
 * Applikationsutveckling i Java, 5DV135
 * HT12
 * Project
 *
 * File: Goal.java
 * Description: A class for representing a goal in a game
 * Date: 18 december 2012
 *
 * cs-user: dv11mgr
 * @author Maria Gramner
 */
package nullInvader.Engine;
import java.awt.Image;
import java.io.IOException;
import javax.imageio.ImageIO;


public class Goal extends Bricks {

    private Image icon;

    /**
     * Constructor, sets the movability of the goal
     * @param movable boolean
     */
    public Goal(boolean movable){
        super(movable);
    }

    /**
     * Method to set the correct image on the goal
     */
    protected void setIcon(){
        try{
            icon = ImageIO.read(getClass().getResource(
                    "/nullInvader/Resources/goal.png"));
        } catch (IOException e){
            System.out.println("Picture goal.png doesn't exist");
        }
    }

    /**
     * Method to get the current image on the goal
     * @return Image
     */
    public Image getIcon(){
        return icon;
    }

    /**
     * Method for setting an effect on a unit when it walks on the
     * goal. No current effect.
     */
    public void landOn(Unit unit){
    }

    /**
     * Method for making an effect occur when the object is being
     * clicked on. No current effect.
     */
    public void wasClicked(){
    }
}
